<div class="w700">
    <div class="title"><?= $co_news['titlemenu' . $hg] ?></div>
    <ul class="news-list">
        <?php
        $i = 0;
        require("library/paging.cls.php");
        $paging = new paging();
        $curpg = $_GET['var3'];
        $curpg = (isset($curpg)) ? $curpg : 1;
        $gotopage = APPLICATION_URL . "news";
        $perpage = 6;
        $pagecount = 6;

        $sql = "select * from news_item   ";

        $query = $db->select($sql);
        $totalrows = $db->numrows($query);

        $sql_list = "select * from news_item  order by orderId, id desc limit " . (($curpg - 1) * $perpage) . ", " . $perpage;
        $qr_list = $db->select($sql_list);
        $num_list = $db->numrows($qr_list);

        while ($tt_list = $db->fetch($qr_list)) {
            $i++;
            if ($i != $num_list)
                $listborder = " border-bottom:#d7d7d7 1px dotted; ";
            else
                $listborder = "";
            ?>

            <li>
                <div class="thumb">
                    <a href="<?= APPLICATION_URL ?>news-detail/<?= $tt_list['titleurl'] ?>.html"><img src="<?= APPLICATION_URL ?>news-img/<?= $tt_list['image'] ?>" alt="news" /></a>
                </div>
                <div class="ctn">
                    <div class="tit"><a href="<?= APPLICATION_URL ?>news-detail/<?= $tt_list['titleurl'] ?>.html"><?= $tt_list['title' . $hg] ?></a></div>
                    <div class="desc">
                        <?= $tt_list['description' . $hg] ?>
                    </div>
                    <div class="more">
                        <a href="<?= APPLICATION_URL ?>news-detail/<?= $tt_list['titleurl'] ?>.html"><?php __('Xem chi tiết'); ?></a>
                    </div>
                </div>
                <div class="clear"></div>
            </li>
            <?php
        }
        ?>	
        <div class="paging"><?php echo $paging->pagenew($totalrows, $perpage, $pagecount, $curpg, $gotopage, "", "titlepage"); ?></div>	
    </ul>

</div>
<div class="w260 ml20">
    <div class="title"><?= $co_tip['titlemenu'.$hg] ?></div>
    <ul class="s-list">
        <?php
        $i = 0;
        require_once ("library/paging.cls.php");
        $paging = new paging();
        $curpg = 1;//$_GET['var2'];
        $curpg = (isset($curpg)) ? $curpg : 1;
        $gotopage = APPLICATION_URL . "tip";
        $perpage = 3;
        $pagecount = 6;

        $sql = "select * from tip_item   ";

        $query = $db->select($sql);
        $totalrows = $db->numrows($query);

        $sql_list = "select * from tip_item  order by orderId, id desc limit " . (($curpg - 1) * $perpage) . ", " . $perpage;
        $qr_list = $db->select($sql_list);
        $num_list = $db->numrows($qr_list);

        while ($tt_list = $db->fetch($qr_list)) {
            $i++;
            if ($i != $num_list)
                $listborder = " border-bottom:#d7d7d7 1px dotted; ";
            else
                $listborder = "";
            ?>
            <li>
                <a href="<?= APPLICATION_URL ?>tip-detail/<?= $tt_list['titleurl'] ?>.html">
                    <img class="image" src="<?= APPLICATION_URL ?>tip-img/<?= $tt_list['image'] ?>" alt="tip" />
                    <div class="desc">
						<div class="tit"><?= $tt_list['title' . $hg] ?></div>
                        <div><?= $tt_list['description' . $hg] ?></div>
                    </div>
                    <div class="clear"></div>
                </a>
            </li>
        <?php } ?>
    </ul>
</div>
